package com.longtop.sp.mapdao;

import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;

import com.longtop.sp.mapdao.util.ComparatorIgnoreCase;

public class MapVO {
	private String tableName;
	private Map data = new LinkedHashMap();

	public MapVO() {
		super();
	}

	public MapVO(String tableName, Map data) {
		super();
		this.tableName = tableName;
		this.data = data;
	}

	public MapVO(String tableName) {
		super();
		this.tableName = tableName;
	}

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public Map getData() {
		return this.data;
	}

	public void setData(Map data) {
		this.data = data;
	}

	public void put(String name, Object value) {
		this.data.put(name, value);
	}

	public void putAll(Map data) {
		if (data != null) {
			this.data.putAll(data);
		}
	}

	public Object get(String name) {
		Set key = this.data.keySet();
		for (Iterator iterator = key.iterator(); iterator.hasNext();) {
			String name_ = (String) iterator.next();
			if (name_.equalsIgnoreCase(name)) {
				return this.data.get(name_);
			}

		}
		return null;
	}

}